
#include <QString>
#include "StringField.h"

StringField::StringField(const QString &name, int lenght)
    : BaseField(name, lenght)
{
    _typeName = "StringField";
}

StringField::StringField(const QString &name, const QString &description, int lenght)
    : BaseField(name, description, lenght)
{
    _typeName = "StringField";
}

// IClassifierField imlemented
bool StringField::validate(const QVariant &value) const
{
    if(value.toString().length() <= _lenght)
        return true;

    return false;
}
